User blog:Random-storykeeper/Collapsible infoboxes
I noticed a number of users have been trying to integrate spoilers into infoboxes by inserting Template:Spoiler/mini into the right field of the infobox. It seems quite obvious, if you test it out for yourself, that this template clearly isn't meant for the infobox. Yet we still want to add spoiler information to infoboxes, despite this setback. One workaround this issue seems to be inserting the words "Spoiler:" within the named parameter, followed by the template code. This does manage to make the spoiler template function properly, but consider the presentation of the overall infobox. The look of Template:Spoiler/mini is altered thanks to the "wikitable" class our infoboxes currently use, not to mention the redundancy of a heading that signals "Spoiler" to a template that already has the heading "Spoiler". From the looks of it, this wiki could sure use a collapsible infobox. Part of the infobox would have a heading that could say something like "spoiler" that opens when "show" is clicked. For several weeks (or was it months?), I was looking around other wikis to examine their collapsible infoboxes, all of which involve some form of complex coding that just doesn't work with our current Nitrome Wiki infobox style. Even working up a collapsible infobox from scratch was difficult for me to grasp (because I'm slow at learning these things, dur), but in the end, I finally put together something that works. Yep, see that thing on the side? That's an idea of what the collapsible infobox could look like. Of course, I inserted random words (copied from my test on Random-storykeeper Wiki) to fill up space, but the style is an idea of what it should look like. Let's use it! So, can this collapsible code be seamlessly integrated with our current ones? If only it was that easy. The collapsible infobox, you see, is not one infobox code, but two: one that defines the "infobox" class, and the second, placed right underneath, has an "infobox collapsible collapsed" class. The two of them end up merging together to create this one infobox that has a collapsible heading. If you try to create another "infobox" class underneath that one, it leaves a small gap that may be, more or less, noticeable, depending on what colour the infobox is. Either way, the collapsible portion is meant to be go at the very bottom of the infobox. Nitrome Wiki, on the other hand, doesn't just use the class "infobox" for its infoboxes, but "infobox wikitable". The class "wikitable" has its own set of formatting that adds the lines separating all the fields from each other. It also gets disrupted when the class "collapsible collapsed" is added to it. Don't get me wrong; it still works, but we're left with this small but noticeable gap between the two infoboxes and they don't merge with each other, thus creating this look of two separate tables rather than one, complete template. In short, I want to remove the "wikitable" class from all our infoboxes. The result? Something that looks like the infobox you saw on the right. The colours, text width and text size are all debatable and can easily be changed. All that pretty much goes away is the lines that separate the columns from each other. Besides that, the changes aren't too drastic, don't you think? Questions, with a purpose. I have been meaning to add collapsible infoboxes to some of our current ones for a while, but I hesitated in doing so, not only because of the sudden change in style, but also because I wasn't sure where to use them. What would go under a "spoiler" heading? Does it need a separate named parameter? Could we also use it to hide other things that aren't spoilers, such as music files in Template:Infobox game? Throw some ideas around in the comments, as well as any questions. I think this would be a great change for Nitrome Wiki to adapt a new infobox style, especially one that can use a collapsible function with ease. Category:Blog posts